<template>
  <div class="app">
    <el-input
      type="textarea"
      :rows="8"
      placeholder="请输入内容"
      style="width:500px"
      v-model="list.notice"

    >
    </el-input>
    <div>
      <el-button type="primary" style="margin-top: 20px" @click="update" v-permission="['parameter.edit']">保存
      </el-button>
    </div>
  </div>
</template>
<script>
import {getInfo, updateMchShop} from "@/api/sysSetUp";
import permission from "@/directive/permission/index.js"; // 权限判断指令
export default {
  directives: {permission},
  created() {
    this.getInfolist()
  },
  data() {
    return {
      list: {}
    }
  },
  methods: {
    getInfolist() {
      getInfo()
        .then((res) => {
          this.list = res.data;

        })
        .catch((err) => {
          console.log(err);
        });
    },
    update() {
      updateMchShop(this.list).then(res => {
        this.$message.success("保存成功");
        this.getInfolist()
      }).catch((err) => {
        console.log(err);
      });

    }

  }

};
</script>
<style>
.app {
  padding-left: 50px;
}

</style>
